package com.woniu.mall.controller;

import com.woniu.mall.VO.StoreListVO;
import com.woniu.mall.pojo.MallStore;
import com.woniu.mall.service.IMallCollectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Klaus
 * @since 2023-05-23
 */
@RestController
@RequestMapping("/mallCollect")
@Api(tags = "收藏管理")
public class MallCollectController {
    @Autowired
    private IMallCollectService collectService;

    @ApiOperation("根据用户id查询商家列表")
    @GetMapping("/getCollect/{userId}")
    public List<StoreListVO> getCollectList(@PathVariable  Integer userId){
        List<StoreListVO> storeList  = collectService.getCollectList(userId);
        return storeList;
    }
}
